//
//  HomeCategroyTableViewCell.m
//  StandardizedProduct
//
//  Created by 宁宁 on 16/6/21.
//  Copyright © 2016年 ym. All rights reserved.
//

#import "HomeCategroyTableViewCell.h"

#import "CategroyCollectionViewCell.h"

@implementation HomeCategroyTableViewCell

static NSString *const CategroyCollectionViewCellID = @"CategroyCollectionViewCell";

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
        layout.scrollDirection = UICollectionViewScrollDirectionVertical;
        layout.minimumLineSpacing = 5;
        layout.minimumInteritemSpacing = 10;
        self.categroyCollectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 200) collectionViewLayout:layout];
        self.categroyCollectionView.backgroundColor = [UIColor clearColor];
        self.categroyCollectionView.scrollEnabled = NO;

        [self.contentView addSubview:self.categroyCollectionView];
        
        
        [self.categroyCollectionView registerNib:[UINib nibWithNibName:@"CategroyCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:CategroyCollectionViewCellID];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
